<template>
  <div class="calendar">
    <input
      type="date"
      v-model="curDate"
    >
    <Card
      v-bind="date"
      :holidayArr="holiday_array"
    />
  </div>
</template>

<script>
import { useCalendar } from '@/hooks'
import { onBeforeMount, watch, ref, toRefs } from 'vue'
import Card from './Card'
export default {
  name: 'Calender',
  components: {
    Card
  },
  setup () {
    const { curDate, state } = useCalendar()
    return {
      curDate,
      ...toRefs(state)
    }
  }
}

</script>

<style scoped>
.calendar {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
input {
  width: 60vw;
  margin-bottom: 8px;
  font-size: 20px;
  padding: 0 8px;
  font-weight: 600;
}
</style>
